import fetch from 'common/src/utils/fetch'
function adjustClassNumber(data) { // 研究生修改教学班容量
    return fetch({
        url: '/api/electionservice/elcResult/adjustClassNumber',
        method: 'post',
        data
    });
}
function getClassArgument(data) {
    return fetch({
        url: '/api/electionservice/elcResult/graduateTeachClassPage',
        method: 'post',
        data: data
    });
}

function teachClassSearch(data) {
    return fetch({
        url: '/api/electionservice/elcResult/teachClassPage',
        method: 'post',
        data: data
    });
}


function teachClassNumPageSearch(data) {
    return fetch({
        url: '/api/electionservice/elcResult/teachClassNumPage',
        method: 'post',
        data: data
    });
}

function updateClassRemark(data) {
    return fetch({
        url: `/api/electionservice/elcResult/updateClassRemark?id=${data.id}&remark=${data.remark}`,
        method: 'post'
    });
}

function bindClass(data) {
    return fetch({
        url: `/api/electionservice/elcResult/bindClass?id=${data.id}&bindClassId=${data.bindClassId}`,
        method: 'get'
    });
}

function saveClassBind(data) {
    return fetch({
        url: `/api/electionservice/elcResult/saveClassBind`,
        method: 'post',
        data: data
    });
}

function updateClassBind(data) {
    return fetch({
        url: `/api/electionservice/elcResult/updateClassBind`,
        method: 'post',
        data: data
    });
}

function download(data) {
    return fetch({
        url: `/api/electionservice/elcResult/teachClassPageExport`,
        method: 'post',
        data: data
    });
}


function tjDownload(data) {
    return fetch({
        url: `/api/electionservice/elcResult/teachClassTjPageExport`,
        method: 'post',
        data: data
    });
}


function exportStatus(key) {
    return fetch({
        url: `/api/electionservice/elcResult/result/${key}`,
        method: 'get'
    });
}

export default {
    teachClassPage: '/api/electionservice/elcResult/teachClassPage', // 研究生教学班容量管理列表查询
    teachClassNumPage: '/api/electionservice/elcResult/teachClassNumPage', // 教学班容量管理列表查询
    adjustClassNumber,
    getClassArgument,
    teachClassSearch,
    teachClassNumPageSearch,
    updateClassRemark,
    saveClassBind,
    updateClassBind,
    download,
    tjDownload,
    exportStatus,
    bindClass
};
